function StatusUpdater(){
	this.initialize.apply(this, arguments);
}
StatusUpdater.prototype = {
	initialize: function(){
		this.textElem = $('status');
	},
	setMediator: function(mediator){
		this.mediator = mediator;
	},
	run: function(){
		var labelElem = $('statusLabel'),
			self;
		
		self = this;
		labelElem.onclick = function(){
			var timer = setInterval(function(){
				var v = self.textElem.value;
				if (v && v.length > 0) {
					clearInterval(timer);
					self.textElem.value = '';
					self.mediator.showBalloon('SEND:' + v);
					Twitter.update({
						value:v,
						success:function(){
							self.mediator.balloon.show({
								text: 'Complete',
								msec: 3000
							});
							self.mediator.timeline.reload();
						},
						error:function(){
							self.mediator.balloon.show({
								text: 'Error',
								msec: 3000
							});
						}
					});
				}
			},250);
		}
	}
};
